/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn;

import cn.webrx.utils.JwtUtils;

/**
 * <p>Project: smvc2022 - JwtOk
 * <p>Powered by webrx On 2022-04-07 16:50:17
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class JwtOk {
    public static void main(String[] args) {

        //生成5分钟有效期令牌
        //System.out.println(new JwtUtils("w").getToken(null, 5));

        //校验令牌
        String t = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NDkzMjE5MjN9.10ykAOiIwMB9q6gcdZox4SeaAzlqRlxnBexIhlNyDvg";
        System.out.println(new JwtUtils("w").verifyToken(t));
        System.out.println(new JwtUtils("w").getPayLoad(t));


    }
}
